Page({
    data: {
        haveChoosedUserIcon: !1
    },
    onLoad: function(o) {
        var n = o.modelType;
        this.setData({
            typeId: n
        });
    },
    onReady: function() {},
    onShow: function() {},
    onHide: function() {},
    onUnload: function() {},
    onPullDownRefresh: function() {},
    onReachBottom: function() {},
    onShareAppMessage: function() {},
    addUserIcon: function() {
        var o = this;
        wx.chooseImage({
            icon: 1,
            success: function(n) {
                var e = n.tempFilePaths;
                o.setData({
                    haveChoosedUserIcon: !0,
                    userIcon: e[0]
                });
            }
        });
    },
    toBuildVisitingCard: function() {
        var o = this.data;
        o.haveChoosedUserIcon ? o.name ? o.position ? o.address ? o.phone ? o.email ? wx.navigateTo({
            url: "/pages/visitingCardProduct/visitingCardProduct?name=" + o.name + "&position=" + o.position + "&address=" + o.address + "&phone=" + o.phone + "&email=" + o.email + "&typeName=" + o.typeId + "&userIcon=" + o.userIcon
        }) : wx.showToast({
            title: "请输入联系邮箱",
            icon: "none"
        }) : wx.showToast({
            title: "请输入联系电话",
            icon: "none"
        }) : wx.showToast({
            title: "请输入公司地址",
            icon: "none"
        }) : wx.showToast({
            title: "请输入您的职位",
            icon: "none"
        }) : wx.showToast({
            title: "请输入您的姓名",
            icon: "none"
        }) : wx.showToast({
            title: "请选择头像图片",
            icon: "none"
        });
    },
    textFill: function(o) {
        var n = o.currentTarget.id, e = o.detail.value;
        console.log(e), "name" == n ? this.setData({
            name: e
        }) : "position" == n ? this.setData({
            position: e
        }) : "address" == n ? this.setData({
            address: e
        }) : "phone" == n ? this.setData({
            phone: e
        }) : this.setData({
            email: e
        });
    }
});